package com.cxkj.shop.biz.commodity;

import java.util.Collection;
import java.util.Map;

import net.wangds.comp.business.http.AbstractBaseHttpInteractionBusiness;

import com.cxkj.shop.form.DefaultDeliveryBuilder;
import com.cxkj.shop.form.Delivery;
import com.cxkj.shop.form.DeliveryBuilder;
import com.cxkj.shop.utils.CommoditiesUtils;

public class GetIgdCmd extends
		AbstractBaseHttpInteractionBusiness<Map<String, Object>, Delivery> {

	@Override
	protected Delivery process(Map<String, Object> arg0) throws Exception {
		Delivery res = null;
		DeliveryBuilder<Collection<Map<String, Object>>> builder = DefaultDeliveryBuilder
				.getInstance();
		try {
			builder.init();
			builder.setData(CommoditiesUtils.queryIgdCmd(arg0));
			builder.success();
		} catch (Exception e) {
			builder.fail();
		} finally {
			res = builder.toDelivery();
			builder.clear();
		}
		return res;
	}

}
